<template>
  <div class="card-118 card-common-cls" :class="{'mask-cls': maskable}" @click="click2Drag">
    <div class="card-118-list">
      <div v-if="!Array.isArray(item.card_group) || item.card_group.length <= 0" class="no-card-group">
        <span>card - 118</span>
      </div>

      <slot></slot>
    </div>
  </div>
</template>

<script>
  export default {
    props: {
      item: Object,
      maskable: {
        type: Boolean,
        default: true,
      },
    },
    methods: {
      click2Drag() {
        // console.log(e);
      },
    },
  }
</script>

<style lang="scss" scoped>
  .mask-cls::before {
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    z-index: 999;
  }

  .card-common-cls {
    position: relative;
    width: 100%;
    max-width: 375px;
    z-index: 0;

    img {
      display: block;
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }

  .card-118-list {
    position: relative;
    width: 100%;
    min-height: 100px;
  }

  .no-card-group {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;

    display: flex;
    justify-content: center;
    align-items: center;

    span {
      color: #f2f2f2;
      font-size: 60px;
      font-weight: 900;
    }
  }
</style>
